package cn.easy.kitchen;

import cn.easy.base.utils.coder.Builder;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * Created by chen on 2015/10/9.
 */
public class CoderBuilder {


    public static void main(String[] args) throws Exception{
        buildCode(args);
    }

    public static void buildCode(String[] args) {
        ApplicationContext ctx = SpringApplication.run(Application.class, args);

//        new Builder("ck_stat_summary", "kitchen", "cn.easy.kitchen", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();
//        new Builder("ck_stat_nutrition", "kitchen", "cn.easy.kitchen", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();
//        new Builder("ck_stat_material_price", "kitchen", "cn.easy.kitchen", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();
//        new Builder("ck_stat_material_structure", "kitchen", "cn.easy.kitchen", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();
        new Builder("ck_material_order", "kitchen", "cn.easy.kitchen", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao();

        SpringApplication.exit(ctx);
    }
}
